<template>
  <div v-if="isShowThisPage" class="box">
    <div class="area-header">
      <span class="area-header-sign" />
      <span class="area-header-title">{{ $t('其它投资') }}</span>
    </div>
    <div class="text item">
      <el-table tooltip-effect="darkTable" :data="tableData" border>
        <el-table-column prop="dealName" :label="$t('项目名称')" />
        <el-table-column prop="nickName" :label="$t('项目负责人')" />
        <el-table-column prop="name" :label="$t('投资主体')" />
        <el-table-column prop="dateInvestmentFact" :label="$t('投资时间')" />
        <el-table-column prop="amountInvestmentEstimate" :label="$t('投资金额') + $t('金额单位')">
          <template slot-scope="scope">
            <span>{{ moneyFormat(scope.row.amountInvestmentEstimate, 'w') }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="latestShareholdingRatio" :label="$t('持股比例(%)')" />
        <el-table-column prop="valuationBeforeInvestment" :label="$t('投前估值') + $t('金额单位')">
          <template slot-scope="scope">
            <span>{{ moneyFormat(scope.row.valuationBeforeInvestment, 'w') }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="valuationBeforeInvestment" :label="$t('投后估值') + $t('金额单位')">
          <template slot-scope="scope">
            <span>{{ moneyFormat(scope.row.valuationBeforeInvestment, 'w') }}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
  import { getByIdFindPostInvestmentInformation } from '@/api/deal/investment/dealInvestment'
  export default {
    components: {
    },
    data() {
      return {
        tableData: {},
        isShowThisPage: false
      }
    },
    created() {
    },
    methods: {
      init() {
        getByIdFindPostInvestmentInformation('undefined', this.$route.query.companyId).then(response => {
          if (response.data.length > 1) {
            this.tableData = response.data
            this.isShowThisPage = true
          }
        })
      }
    }
  }
</script>
